//
//  DYPermissionCell.m
//  kafuMerchant
//
//  Created by 帝云科技 on 2018/9/19.
//  Copyright © 2018年 帝云科技. All rights reserved.
//

#import "DYPermissionCell.h"

@interface DYPermissionCell ()

@property (nonatomic,strong)UIImageView *iconImageView;
@property (nonatomic,strong)UILabel *permissionLabel;
@property (nonatomic,strong)UILabel *numLabel;

@end

@implementation DYPermissionCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}
-(void)dy_initUI
{
    [super dy_initUI];
    
    self.iconImageView = ({
        UIImageView *imageView=[Utils imageViewWithImage:IMG(@"ic_jurisdictionlist")];
        imageView;
    });
    
    self.permissionLabel = ({
        UILabel *label=[Utils labelWithTitleFontSize:14 textColor:[UIColor xhq_aTitle] alignment:0];
        label;
    });
    
    self.numLabel = ({
        UILabel *label=[Utils labelWithTitleFontSize:14 textColor:[UIColor xhq_aTitle] alignment:1];
        label;
    });
    
    [self addSubview:self.iconImageView];
    [self addSubview:self.permissionLabel];
    [self addSubview:self.numLabel];
    
    [self.iconImageView makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(BILIWIDTH(60));
        make.centerY.equalTo(self);
    }];
    
    [self.permissionLabel makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.iconImageView.right).offset(BILIWIDTH(6));
        make.centerY.equalTo(self);
    }];
    
    [self.numLabel makeConstraints:^(MASConstraintMaker *make) {
        make.right.equalTo(0);
        make.width.equalTo(kScreenWidth/2);
        make.centerY.equalTo(self);
    }];
    
    self.permissionLabel.text=@"营业员";
    self.numLabel.text=@"5";
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
